@use '@scss/common' as *;

.wrapper {
  position: relative;
  border-bottom: 1px solid var(--theme-border-color);
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 2.5rem 1.5rem;
  @include mid-break {
    display: none;
  }
}

.sidebarGroup {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block: 0.75rem;

  & > h6 {
    margin: 0;
    opacity: 0.75;
  }

  & > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    @include small;
    & > li {
      line-height: 1.75em;
    }
  }
}

.socialIcons {
  max-width: 100%;
  flex-wrap: wrap;
  display: flex;
  gap: 0.5rem;
}

.badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.badge {
  @include small;
  & {
    display: flex;
    align-items: center;
    border-radius: 3px;
    padding: 0.25rem 0.5rem 0.25rem;
    width: max-content;
  }
}

.featured {
  background-color: var(--theme-warning-50);
  border: 1px solid var(--theme-warning-100);
  color: var(--theme-warning-700);
}

.contributor {
  background-color: var(--theme-success-50);
  border: 1px solid var(--theme-success-100);
  color: var(--theme-success-700);
}

.main {
  padding: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3rem;

  h1,
  h2,
  h3 {
    margin: 0;
  }

  @include mid-break {
    padding: 1.5rem 0 0;
    gap: 2rem;
  }
}

.name,
.textBlock,
.contributions,
.projects,
.detailsMobile {
  padding: 0 var(--column);
  width: 100%;

  @include mid-break {
    padding: 0 1.5rem;
  }
}

.banner {
  width: calc(var(--column) * 13);
  height: auto;
  overflow: hidden;
  padding-inline: 1px;
  border: 1px solid var(--theme-border-color);
  background-color: var(--theme-bg);

  @include mid-break {
    width: 100%;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

.textBlock {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.caseStudy {
  display: flex;
  position: relative;
  width: 100%;
  border-block: 1px solid var(--theme-border-color);
  text-decoration: none;

  h6 {
    display: flex;
    gap: 0.5rem;
  }

  @include mid-break {
    flex-direction: column;
  }

  h2 {
    margin: 0;
  }

  .caseStudyText {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: calc(var(--column) * 6);
    gap: 0.75rem;
    padding: 3rem var(--column);

    @include mid-break {
      padding: 2rem 1.5rem;
      width: 100%;
    }

    & > * {
      margin: 0;
    }
  }

  .caseStudyImage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    flex: 2 3 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: left center;
    }
  }

  .scanlines {
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
  }

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--theme-text);
    z-index: -1;
    transition: width 0.3s;
  }

  .scanlines {
    opacity: 1;
  }

  &:hover {
    &::after {
      width: 100%;
    }

    .arrow {
      transform: translate(4px, -4px);
    }
  }
}

.contributions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.projectTable {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  width: 100%;
  position: relative;
  border-bottom: 1px solid var(--theme-border-color);
  text-decoration: none;
  transition: gap 0.3s ease;

  &:last-child {
    border-bottom: none;
  }
}

.projectYear {
  @include small;
  & {
    opacity: 0.75;
    width: 3rem;
  }
}

.projectName {
  width: 100%;
  font-weight: 500;
}

.arrow {
  display: block;
  transition: transform 0.3s ease;
}

.project:hover {
  & > .arrow {
    transform: translate(0.25rem, -0.25rem);
  }

  & > .projectName {
    opacity: 0.75;
  }
}

.contactForm {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  padding: 4rem var(--column) 5rem;
  position: relative;
  border-top: 1px solid var(--theme-border-color);

  @include mid-break {
    padding: 2.5rem 1.5rem;
  }
}

.form {
  background-color: var(--theme-bg);
  z-index: 1;
}

.formScanlines {
  z-index: -1;
}

.detailsMobile {
  display: none;

  @include mid-break {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  & > div {
    display: flex;
    gap: 1rem;

    &:first-child {
      flex-direction: row;
      gap: 0.5rem;
      margin: 0.75rem 0;
    }

    & > ul {
      display: flex;
      gap: 0.25rem;
      flex-wrap: wrap;

      & > li {
        list-style: none;
        @include small;
        & {
          display: flex;
          align-items: center;
          padding: 0.25rem 0.5rem;
          border-radius: 3px;
          background-color: var(--theme-elevation-50);
          border: 1px solid var(--theme-elevation-150);
        }
      }
    }
  }
}
